package com.zff.rental.entity.apartment;

import com.baomidou.mybatisplus.annotation.TableName;
import com.zff.rental.AppConstant;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Comment;

import java.io.Serializable;

/**
 * @author HCY
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@EqualsAndHashCode(callSuper = false)
@IdClass(TrRoomDeviceEntity.class)
@Table(name = AppConstant.TABLE_NAME_TR_ROOM_DEVICE)
@TableName(AppConstant.TABLE_NAME_TR_ROOM_DEVICE)
public class TrRoomDeviceEntity implements Serializable {
    @Id
    @Comment("房间Id")
    private Long roomId;

    @Id
    @Comment("设备Id")
    private Long deviceId;
}